package docker

//docker 虚悬镜像

/*
	虚悬镜像，即 仓库名,标签都是<none>的镜像，俗称 dangling image

	来源：
		构建镜像或者删除镜像的时候，出现的一些错误，导致仓库[REPOSITORY]和标签[TAG]都是<none>
		遇见这种镜像，一定删除


	使用dockerfile构建虚悬镜像，查看 docker-0034-dockerfile构建一个虚悬镜像



		查询本地所有的虚悬镜像
			docker image ls -f dangling=true

root@VM-4-8-debian:/home/zydh/www/dockerfile_test2# docker image ls -f dangling=true
REPOSITORY   TAG       IMAGE ID       CREATED         SIZE
<none>       <none>    04f067290b55   6 minutes ago   992MB
root@VM-4-8-debian:/home/zydh/www/dockerfile_test2#


		删除虚悬镜像
			docker image prune



root@VM-4-8-debian:/home/zydh/www/dockerfile_test2# docker image prune
WARNING! This will remove all dangling images.
Are you sure you want to continue? [y/N] y
Deleted Images:
deleted: sha256:04f067290b55c618410a24553b13a268a2f17ee96cd8db6d52d3c6f0b3cc70fd

Total reclaimed space: 0B
root@VM-4-8-debian:/home/zydh/www/dockerfile_test2# docker images
REPOSITORY   TAG       IMAGE ID       CREATED        SIZE
redis        7.0.5     f8528f17261c   4 days ago     117MB
golang       1.19      4f7c78c9b46f   3 weeks ago    992MB
golang       latest    276895edf967   9 months ago   941MB
redis        latest    7614ae9453d1   9 months ago   113MB
mysql        latest    3218b38490ce   9 months ago   516MB
root@VM-4-8-debian:/home/zydh/www/dockerfile_test2#




*/
